package net.zjitc.service;

import net.zjitc.dao.UserDao;
import net.zjitc.domain.User;

import java.sql.SQLException;

/**
 * Created by Administrator on 2017/9/27.
 */

/**
 * 定义一个业务层.用来处理user的相关业务
 */
public class UserService {
    public User findByUsernameAndPassword(String username, String password) throws SQLException {
       // 从dao里面取数据，厨师--->采购
        UserDao dao = new UserDao();
        User user = dao.findByUsernameAndPassword(username,password);
        return user;
    }
}
